﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Mjollnir;

namespace Test.Mjollnir
{
    [TestClass]
    public class PredicativeTest
    {
        [TestMethod]
        public void IsNullTest1()
        {
#pragma warning disable 1720
            Assert.IsTrue(default(object).IsNull());
#pragma warning restore 1720
            Assert.IsFalse(new object().IsNull());
        }

        [TestMethod]
        public void IsBetweenTest1()
        {
            var from = 1;
            var to = 10;

            Assert.IsTrue(5.IsBetween(from, to));

            Assert.IsTrue(1.IsBetween(from, to));
            Assert.IsTrue(10.IsBetween(from, to));

            Assert.IsFalse(0.IsBetween(from, to));
            Assert.IsFalse(11.IsBetween(from, to));
        }
    }
}
